[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
##############################################################################
###+-----------+##############################################################
#+-| LUPDATE() |-----------------------------------------------------+########
#| +-----------+ Returns the date when the database was last updated |########
#+-------------------------------------------------------------------+########
##############################################################################
##############################################################################
#+--| Summary |------------------+############################################
#| #INCLUDE database.hdr |############################################
#+-------------------------------+############################################
##############################################################################
##############################################################################
#+--| Syntax |-----------------------------+##################################
#| FUNCTION DATE lupdate PROTOTYPE |##################################
#+-----------------------------------------+##################################
##############################################################################
##############################################################################
#############+---| Description |--------------------------------+#############
#############| The lupdate() function returns the date when the |#############
#############| currently selected database was last updated. |#############
#############+--------------------------------------------------+#############
##############################################################################
##############################################################################
#########+--| Example 1 |-------------------------------------------+#########
#########| * Has database been modified today? Make this |#########
#########| * check prior to terminating program. |#########
#########| |#########
#########| IF lupdate() = today() |#########
#########| ? "Entry has already occurred today..." |#########
#########| ACCEPT "Backup database [Y/N]? " TO ans |#########
#########| IF ans $ "Yy" |#########
#########| DO backup_databases |#########
#########| ENDIF |#########
#########| ENDIF |#########
#########| QUIT |#########
#########+----------------------------------------------------------+#########
##############################################################################
##############################################################################
#########+--| Example 2 |-------------------------------------------+#########
#########| * Copy all databases modified today to another disk. |#########
#########| |#########
#########| #include system.hdr |#########
#########| #include database.hdr |#########
#########| |#########
#########| DEBDEF a && No fields are declared |#########
#########| && because we are not |#########
#########| && referencing any fields. |#########
#########| ENDDEF |#########
#########| |#########
#########| PROCEDURE force_main |#########
#########| VARDEF |#########
#########| CHAR(80) filename |#########
#########| ENDDEF |#########
#########| |#########
#########| IF .NOT. find_first("*.dbf") |#########
#########| QUIT |#########
#########| ENDIF |#########
#########| |#########
#########| REPEAT |#########
#########| filename = find_fstr() |#########
#########| USE filename ALIAS a |#########
#########| IF lupdate() = today() |#########
#########| COPY filename TO "a:\"+filename |#########
#########| ENDIF |#########
#########| UNTIL .NOT. find_next() |#########
#########| |#########
#########| ENDPRO |#########
#########+----------------------------------------------------------+#########
##############################################################################
See Also:
a_lupdate()
exist()
filesize()
today()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson